<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>工序汇报</title>
  <t:base type="jquery,easyui,tools,DatePicker,utils,yongxin_js,yongxin_css,mobile_css"></t:base>
 </head>
 
 <script>
 	$(function(){
 	
 			$.ajax({
				type : "POST",
				url : "processReport004Controller.do?getProcess&fbcph=${processReportPage.fbcph}",
				data: {},
				success : function(jsondata) {
						data = $.parseJSON(jsondata);
						var str ="";
						$(data.obj).each(function(i,j){
							//console.log(j);
							
							str +="<span class='progress'>"+j.typename+"("+j.fbcph+")</span>";
							if(i%6==0){
								str +="<br><br>";
							}
							str +="<span >-----></span>";
							
							//console.log(str);
							
						});
						//str +=data.msg;
						
						console.log(str);
						$('#div_process').html(str);
						
						$('#nprocess').val('${processReportPage.nprocess}');
					}
			});
 	   selChange();
 	})
 
 	
 	 
 	  function selChange(){

  var sel = $("#fworkshop").val();
  $.ajax({
		type : "POST",
		url : "processReportController.do?getMatchinegroupList&process=${processReportPage.cprocess}",
		data: {pid:$('#fworkshop').val()},
		success : function(jsondata) {
				data = $.parseJSON(jsondata);
				console.log(data);
				$('#fmatchinegroup').html(data.msg);
			  	$('#fmatchinegroup').val("${processReportPage.fmatchinegroup}");
			}
	});
	
}
 </script>
 
 <body  scroll="no">
		<div id="wrapper">
					<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table"
						action="processReport004Controller.do?save&fstate=4" beforeSubmit="checkLHEmpty">

						<input type="hidden" id="cprocess" name="cprocess" class="mytxt" ignore="ignore" value="${processReportPage.cprocess}">
						<table  cellpadding="0" cellspacing="1" class="formtable">
							<tr>
								<td align="center" colspan=11>
									<label class="Validform_label">
										装炉
									</label>
								</td>

							</tr>
							<tr>
								<td align="center" colspan=11 style="background-color: white; padding: 20px">
									<div id="div_process"></div>

								</td>

							</tr>

							<tr>
								<td align="center">
									<label class="Validform_label">
										生产车间
									</label>
								</td>
								<td class="value" colspan=10><!--
									 <t:dictSelect field="fworkshop" typeGroupCode="workshop" hasLabel="false"  defaultVal="${processReportPage.fworkshop}" extendJson="{id:sel2}"></t:dictSelect>

								-->
								 <select  id="fworkshop"  name="fworkshop" onchange="selChange()">
								     <c:forEach items="${workshopList}" var="workshop">
								        <option value="${workshop.id}"   <c:if test="${workshop.id==processReportPage.fworkshop}"> selected="selected"</c:if>>${workshop.name}</option>
								     </c:forEach>
								     </select>
								</td>
							</tr>
							<tr>
								<td align="center">
									<label class="Validform_label">
										班组
									</label>
								</td>
								<td class="value" colspan=10>
									 <t:dictSelect field="fworkgroup" typeGroupCode="team" hasLabel="false"  defaultVal="${processReportPage.fworkgroup}" extendJson="{id:sel2}"></t:dictSelect>
								</td>
							</tr>


							<tr>
								<td align="center">
									<label class="Validform_label">
										机组
									</label>
								</td>
								<td class="value" colspan=10>
									<!--<input id="fmatchinegroup" name="fmatchinegroup" style="width: 140px;" class="mytxt" ignore="ignore"
										value="${processReportPage.fmatchinegroup}">

								-->
								   <select id='fmatchinegroup' name='fmatchinegroup'><option value=''>请选择</option></select>
								
								  
								</td>
							</tr>
							<tr style="display: none">
								<td align="center">
									<label class="Validform_label">
										制单人
									</label>
								</td>
								<td class="value" colspan=10>
									<input id="createBy" name="createBy" style="width: 140px;" class="mytxt" ignore="ignore" readOnly
										value="${processReportPage.createBy}">

								</td>
							</tr>
									<tr>
								<td align="center">
									<label class="Validform_label">
										进炉时间
									</label>
								</td>
								<td class="value" colspan=10>
									<input class="mytxt" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 140px" id="fjldate"
										name="fjldate" class="mytxt"  dataType="date"  nullMsg="请填写进炉时间"
										value="<fmt:formatDate value='${annealerPage.fjldate}' 
						type="date" pattern="yyyy-MM-dd hh:mm:ss"/>">
								</td>
							</tr>
							<tr>
								<td align="center">
									<label class="Validform_label">
										炉号
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										本厂批号
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										投入厚度
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										投入宽度
									</label>
								</td>
								<td align="center">
									<label class="Validform_label">
										投入重量
									</label>
								</td>

							</tr>

							<c:if test="${fn:length(processReportList)  > 0 }">
								<c:forEach items="${processReportList}" var="poVal" varStatus="stuts">
									<tr id="record_tr" class="trRecord">
										<c:if test="${stuts.index==0}">
											<td align="center" class="value" rowspan=7>

												<select id="flh" name="flh">
													<option value="">
														--请选择--
													</option>
													<option value="1号炉">
														1号炉
													</option>
													<option value="2号炉">
														2号炉
													</option>
													<option value="3号炉">
														3号炉
													</option>
													<option value="4号炉">
														4号炉
													</option>
													<option value="5号炉">
														5号炉
													</option>
													<option value="6号炉">
														6号炉
													</option>
													<option value="7号炉">
														7号炉
													</option>
													<option value="8号炉">
														8号炉
													</option>
													<option value="9号炉">
														9号炉
													</option>
													<option value="10号炉">
														10号炉
													</option>
													<option value="11号炉">
														11号炉
													</option>
													<option value="12号炉">
														12号炉
													</option>
													<option value="13号炉">
														13号炉
													</option>
													<option value="14号炉">
														14号炉
													</option>
													<option value="15号炉">
														15号炉
													</option>
													<option value="16号炉">
														16号炉
													</option>
													<option value="17号炉">
														17号炉
													</option>
													<option value="18号炉">
														18号炉
													</option>
													<option value="19号炉">
														19号炉
													</option>
													<option value="20号炉">
														20号炉
													</option>
												</select>

											</td>
										</c:if>
										<td align="center" class="value">

											<input id="fbcph" name="fbcph" style="width: 100px;" class="mytxt" ignore="ignore" value="${poVal.fbcph}"
												style="width:120px" ReadOnly>
											<input type="hidden" name="id" id="id" value="${poVal.id}" />
										</td>
										<td align="center" class="value">

											<input id="ftrhd" name="ftrhd" class="mytxt" ignore="ignore" value="${poVal.ftrhd}" ReadOnly>
										</td>
										<td align="center" class="value">
											<input id="ftrkd" name="ftrkd" class="mytxt" ignore="ignore" value="${poVal.ftrkd}" ReadOnly>

										</td>
										<td align="center" class="value">
											<input id="ftrzl" name="ftrzl" class="mytxt" ignore="ignore" value="${poVal.ftrzl}" ReadOnly>

										</td>
									</tr>
								</c:forEach>
							</c:if>

						</table>
					</t:formvalid>
				</div>
	</body>